//
//  CollectViewController.m
//  pmmSS
//
//  Created by Mac book on 2017/9/22.
//  Copyright © 2017年 WTFSSD. All rights reserved.
//

#import "CollectViewController.h"
#import "collect_shop_Controller.h"
#import "collect_commodity_Controller.h"



@interface CollectViewController ()

@end

@implementation CollectViewController

-(void)viewDidAppear:(BOOL)animated{
    [super viewDidAppear:animated];

    [self setUpNavBar];



}
-(void)viewDidLoad{

    [super viewDidLoad];

    self.controllerClassNames = @"collect_commodity_Controller,collect_shop_Controller";
    [self setTitles:@[@"收藏商品",@"收藏店铺"]];

}
-(void)setUpNavBar{


    UILabel *title_label = [HMLabel createLabelWithText:@"我的收藏" andTextColor:[UIColor whiteColor] andBgColor:nil andFont:[UIFont fontWithName:default_fontname size:autoScaleW(20)] andTextAlignment:NSTextAlignmentCenter];

    title_label.frame = CGRectMake(0, 0, 100, 35);

    [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"nav_bgimage"] forBarMetrics:UIBarMetricsDefault];

    self.navigationItem.titleView = title_label;



    UIButton *leftBtn = [HMButton createButtonWithTitle:@"" andTitleColor:nil andBgColor:nil andImage:[UIImage imageNamed:@"icon_arrow_left_white"] andBgImage:nil andSelecter:@selector(clickButton:) andTarget:self andTag:101];
    leftBtn.frame = CGRectMake(0, 0, autoScaleW(60), autoScaleW(30));
    [leftBtn setImageEdgeInsets:UIEdgeInsetsMake(autoScaleH(7), 0, autoScaleH(7), autoScaleW(50))];

    UIBarButtonItem *leftItem = [[UIBarButtonItem alloc]initWithCustomView:leftBtn];

    [self.navigationItem setLeftBarButtonItem:leftItem];


}

-(void)clickButton:(UIButton *)button{
    
    [self.navigationController popViewControllerAnimated:YES];
    
    
}


@end
